﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Apply
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void OnShowBook(object sender, RoutedEventArgs e)
        {
            var bookUI = new BookUC();
            bookUI.DataContext = new Book("我是标题 ", "我是出版社", "112-765-11190", "作者1", "作者2");
            this.tb1.SelectedIndex =
            this.tb1.Items.Add(new TabItem { Header = "Book", Content = bookUI });
        }

        private void OnShowBooks(object sender, RoutedEventArgs e)
        {
            var booksUI = new BooksUC();
            this.tb1.SelectedIndex =
                this.tb1.Items.Add(new TabItem { Header = "Books", Content = booksUI });
        }
    }
}
